
import SwiftUI



struct ContentView:View{
    @State private var currentSelected:Tab = .homepage
    @State private var isPresented = false
    @State private var isDrawerVisible = false

    var body: some View {
        NavigationStack{
            ZStack{
                VStack{
                    TopBar(isDrawerVisible: $isDrawerVisible)
                    switch currentSelected {
                    case .homepage:
                        Homepage()
                    case .course:
                        Classification()
                    case .create:
                        EmptyView()
                    case .collect:
                        Collect()
                    case .mine:
                        Mine()
                    }
                    BottomTabs(currentSelected: $currentSelected,isPresented: $isPresented)
                }
                Drawer(isDrawerVisible: $isDrawerVisible)
            }

        }
    }
}


#Preview {
    ContentView()
}
